package iscript.gameFramework.IsoEngine.core
{
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;
	import iscript.gameFramework.IsoEngine.display.IsoGrid;
	
	public class IsoScene extends Sprite
	{
		private var _IsRender:Boolean;
		private var _IsoGrid:IsoGrid;
		private var _IsoChildContainer:Sprite;
		public function IsoScene()
		{
		   
		}
		
		public function render(container:DisplayObjectContainer = null):void
		{
			if (!_IsRender)
			{
				_IsRender = true;
				if (_IsoGrid) addChild(_IsoGrid);
				_IsoChildContainer = new Sprite();
				addChild(_IsoChildContainer);
				container.addChild(this);
			}
		}
		
		
		public function get IsRender():Boolean
		{
			return _IsRender;
		}
		
		public function setIsoGrid(isoGrid:IsoGrid):void {
			   _IsoGrid = isoGrid;
			}
		 
		public function addIsoChild(target:DisplayObject):void {
			_IsoChildContainer.addChild(target)
			}
	
	}
}